package com.yfqy.admin.domain.mapper;

import com.yfqy.admin.domain.entity.CategoryAttribute;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface CategoryAttributeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CategoryAttribute record);

    int insertSelective(CategoryAttribute record);

    CategoryAttribute selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CategoryAttribute record);

    int updateByPrimaryKey(CategoryAttribute record);

    int insertBatch(@Param("categoryAttributes") List<CategoryAttribute> categoryAttributes);

    Set<Long> selectAttributeIdsByCategoryId(@Param("categoryId") Long id);

    int updateStatusByCategoryById(@Param("categoryId") Long id, @Param("modifiedBy") Long modifiedBy);

    int updateStatusByCategoryByIdAndAttributeIds(@Param("categoryId") Long id, @Param("attributeIds") Set<Long> attributeIds, @Param("modifiedBy") Long modifiedBy);
}